<?php
class MY_Controller extends CI_Controller{
	public function __construct(){
		parent::__construct();
		if(empty($_SESSION['username'])){
			redirect(site_url('user/index'));
		}else{
			$book = $this->db
				->where('incharge_id',$_SESSION['id'])
				->get('book')
				->result();
			$this->session->set_flashdata('book',$book);
		}
	}
}